<?php
include_once LIB_PATH . DS . 'getFileObject.php';
use OSS\Core\OssException;
use OSS\OssClient;
function clean($bucket)
{
    $objects = getFileObject($bucket);
    try {
        $ossClient = new OssClient(ossAccessKeyId, ossAccessKeySecret, ossEndpoint);

        $ossClient->deleteObjects($bucket, $objects);
    } catch (OssException $e) {
        printf(__FUNCTION__ . ": FAILED\n");
        printf($e->getMessage() . "\n");
        return;
    }
    print(__FUNCTION__ . ": OK" . "\n");
}
